Skip to content

OG card Garamond headline + whitepaper PDF cover refresh (items 1 + 2)#292

Merged
blove merged 2 commits into
mainfrom
claude/og-garamond
May 13, 2026
Merged

OG card Garamond headline + whitepaper PDF cover refresh (items 1 + 2)#292
blove merged 2 commits into
mainfrom
claude/og-garamond

Conversation

@blove
Copy link
Copy Markdown
Contributor

@blove blove commented May 13, 2026

Summary

Follow-up to the post-merge brand sweep. Closes items 1 + 2 from the leftover work.

Item 2 — EB Garamond headline on the OG card

Bundles a static-weight EB Garamond Bold TTF next to `opengraph-image.tsx` so the share-card headline renders in the marketing-site h1 typeface instead of falling back to Inter Bold.

  • `apps/website/src/app/EBGaramond-Bold.ttf` — 509KB, static-weight Bold.
  • `apps/website/src/app/opengraph-image.tsx` — loads the local TTF; runtime flipped from `edge` to `nodejs` for disk reads.
  • `apps/website/scripts/instance-garamond.py` — reproducible script that downloads the upstream variable Garamond, instances it to weight 700, and strips variable-font tables (Satori can't parse them). Re-run after upstream font updates.

Why a local TTF: Google Fonts only serves Garamond as `woff2` (Satori can't decode), and the upstream variable TTF trips Satori's parser with `Cannot read properties of undefined (reading '256')` on variable-font tables.

Item 1 — Whitepaper PDF cover refresh

PR #277 updated the generator script's per-paper `coverGradient` configs, but the actual deployed PDFs (`whitepaper.pdf`, `whitepapers/{angular,render,chat}.pdf`) still had legacy 4-stop pastel covers because regenerating them required `ANTHROPIC_API_KEY` (the script LLM-generates chapter prose).

This PR refreshes the covers surgically without re-running the LLM:

  • For each `*-preview.html`, find/replace the legacy 4-stop pastel gradient with the per-paper subtle 2-stop tint matching the source change in Email brand pass: drop gradient header, use new palette #277. Also updates cover-footer color (`#888` → `#8b8fa3`) and TOC row styles (`rgba(0,0,0,.06)`/`#444` → `#e6e8ee`/`#555770`).

  • Re-renders each updated HTML to PDF via Puppeteer.

  • `apps/website/scripts/refresh-whitepaper-covers.ts` — reproducible. Re-run with `pnpm tsx apps/website/scripts/refresh-whitepaper-covers.ts`.

  • 8 artifact files updated (4 preview HTMLs + 4 PDFs).

The LLM-generated chapter prose is unchanged — still correct against the current API surface.

Test plan

  • `pnpm nx e2e website` — 35 passed
  • Local `/opengraph-image` render — headline + `cacheplane.ai` wordmark in EB Garamond Bold
  • First-page PDF visual check — clean two-stop blue gradient cover with serif title, mono eyebrow, italic subtitle, muted footer
  • Verify deployed OG card via Twitter / LinkedIn debugger after merge

🤖 Generated with Claude Code

Bundles a static-weight EB Garamond Bold TTF next to opengraph-image.tsx
so the share card headline renders in the marketing-site h1 typeface
instead of falling back to Inter Bold.

Why the TTF lives in the repo:
- Google Fonts only serves Garamond as woff2, which Satori (next/og's
  underlying renderer) cannot decode.
- The upstream variable-weight TTF trips Satori's parser with
  "Cannot read properties of undefined (reading '256')" on the variable
  font tables (fvar/STAT/MVAR/HVAR).

Solution: instance the upstream variable font to wght=700 using
fontTools' instancer, then drop the unused variable-font tables.
Output is a clean static-weight TTF (~500KB) that Satori parses
without issue.

New apps/website/scripts/instance-garamond.py reproduces the TTF
from upstream — re-run after any upstream font update.

Also flips the route's runtime from 'edge' to 'nodejs' so the font
file can be read off disk via fileURLToPath(import.meta.url).

All 35 website e2e tests pass.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cacheplane Ready Ready Preview, Comment May 13, 2026 4:44am

Request Review

…ow-up)

Refreshes the 4 deployed whitepaper artifacts to match the new Statusbrew
cover aesthetic shipped in PR #277. The PR #277 fix updated the generator
script's coverGradient configs, but the actual on-disk PDFs and preview
HTMLs were never regenerated (would have required ANTHROPIC_API_KEY).

Approach taken here (no LLM calls needed):
- Find/replace the legacy 4-stop pastel gradient in each *-preview.html
  with its per-paper subtle 2-stop tint matching PR #277's source change.
- Update cover footer color (#888 → #8b8fa3 / textMuted) and TOC row
  styles (rgba(0,0,0,.06)/#444 → #e6e8ee/#555770) to match.
- Re-render each updated HTML to PDF via Puppeteer.

The LLM-generated chapter prose is unchanged — it remains correct against
the current API surface (the generator script's CURRENT_API_CONTEXT +
BANNED_TERMS filter has been guarding that).

New reproducible script: apps/website/scripts/refresh-whitepaper-covers.ts
Re-run with: pnpm tsx apps/website/scripts/refresh-whitepaper-covers.ts

Files refreshed:
- whitepaper-preview.html + whitepaper.pdf (overview / agent)
- whitepapers/angular-preview.html + angular.pdf
- whitepapers/render-preview.html + render.pdf
- whitepapers/chat-preview.html + chat.pdf

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@blove blove changed the title OG card: real EB Garamond headline (item 2 follow-up) OG card Garamond headline + whitepaper PDF cover refresh (items 1 + 2) May 13, 2026
@blove blove merged commit 115544e into main May 13, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant